//
//  DetailInformationViewController.m
//  BabyAndBabyDriver
//
//  Created by 尹宁 on 16/8/22.
//  Copyright © 2016年 范琦. All rights reserved.
//

#import "DetailInformationViewController.h"
#import "DetailView.h"
@interface DetailInformationViewController ()

@property (nonatomic, strong) DetailView *DetailInformationView;
@end

@implementation DetailInformationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"通知";
    [self creatBigView];
    [self getListData];
}

- (void)viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = YES;
}

- (void)creatBigView
{

    self.DetailInformationView = [[[NSBundle mainBundle] loadNibNamed:@"DetailView" owner:nil options:nil] lastObject];
    _DetailInformationView.frame = CGRectMake(0, 0, 375 * KSCREENWIDTH / 375, KSCREENHEIGHT);
    [self.view addSubview:_DetailInformationView];
    
}

- (void)getListData
{
    YTKNetHandle *api = [[YTKNetHandle alloc]initWithUrl:@"Notice/detail.json" paramDic:@{@"token":TOKEN,@"id":_ID} RegisterApiMethod:RequestMethodPost];
    NSLog(@"%@", _ID);
    [api startWithCompletionBlockWithSuccess:^(YTKBaseRequest *request) {
                NSLog(@"%@", request.responseBody);
        NSDictionary *dic = request.responseBody[@"result"];
        //        NSLog(@"%@",dic);
        _DetailInformationView.contextLabel.text = dic[@"context"];

    } failure:^(YTKBaseRequest *request) {
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
